package cn.alusiaor.springbootsecurity.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;

/**
 * @author zhuzhiping
 * @date 2019/11/26
 * @description 功能描述
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    private String id;
    @NotBlank(message = "姓名不能为空")
    private String name;
    @NotBlank(message = "联系电话不能为空")
    private String phone;
    @Email(message = "邮箱格式错误")
    private String email;

    public User(String name, String email) {
        this.name = name;
        this.email = email;
    }

}
